package com.demo.controller;

import com.demo.exception.CustomerException;
import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestParam;

@Controller
@RequestMapping("order")
public class OrderController4 {

    @RequestMapping("getOrderDetail3")
    public String getOrderById(@RequestParam("id") Long id) {
        if (id < 0) {
            throw new CustomerException("传入ID是不能小于0的");
        }

        int i = 2 / 0;

        return "orderDetail";
    }
}
